Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom camera controller #244

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tychuang1211
Copy link
Collaborator

As mentioned in issue #70, the current camera control needs improvement. This pull request aims to create our own camera controller class derived from QAbstractCameraController to better suit our requirements. At this point, the code introduces a new camera controller to the menu, which functions in the same way as the RFirstPersonCameraController. Further discussion is needed to determinte which functions should be added to the controller.

Copy link
Member

@yungyuc yungyuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks nice and it is time for us to make tests for the UI code. Do you have an idea for how to write Python unit tests for it?

@@ -60,6 +60,45 @@ class ROrbitCameraController
using Qt3DExtras::QOrbitCameraController::QOrbitCameraController;
}; /* end class ROrbitCameraController */

class RCustomCameraController
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though this is prototype code, we may use a descriptive name for the class. What name would be informative?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, I don't know, I think it depends on the behavior of the camera? like orbital or FPS

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would you like the camera to behave (move)?

@yungyuc yungyuc added the viewer Visualize stuff label Oct 20, 2023
@tychuang1211
Copy link
Collaborator Author

It looks nice and it is time for us to make tests for the UI code. Do you have an idea for how to write Python unit tests for it?

I've never wrote unit tests for UI, maybe try pytest-qt?

@yungyuc
Copy link
Member

yungyuc commented Oct 21, 2023

I've never wrote unit tests for UI, maybe try pytest-qt?

If it does not take a lot of time (like more than 4 hours), it is a good idea to give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
viewer Visualize stuff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants